﻿namespace Traffic.Entity;

/// <summary>
/// 用户订单表
/// </summary>
public partial class UserOrder
{
    public int Id { get; set; }

    /// <summary>
    /// 用户ID
    /// </summary>
    public int UserId { get; set; }

    /// <summary>
    /// 订单号
    /// </summary>
    public string OrderNum { get; set; } = null!;

    /// <summary>
    /// 订单类型  0：帐户充值  后续按需扩充
    /// </summary>
    public int OrderType { get; set; }

    /// <summary>
    /// 创建日期
    /// </summary>
    public DateTime CreateDate { get; set; }

    /// <summary>
    /// 产品名称  如：成为VIP会员，帐号充值，代金券。
    /// </summary>
    public string? ProductName { get; set; }

    /// <summary>
    /// 总价，但不一定是最终支付价。
    /// </summary>
    public decimal? TotalPrice { get; set; }

    /// <summary>
    /// 是否使用优惠
    /// </summary>
    public bool UseDiscount { get; set; }

    /// <summary>
    /// 优惠类型  0：积分  1：代金券 
    /// </summary>
    public int DiscountType { get; set; }

    /// <summary>
    /// 优惠金额
    /// </summary>
    public decimal DiscountAmount { get; set; }

    /// <summary>
    /// 实际支付金额
    /// </summary>
    public decimal PayPrice { get; set; }

    /// <summary>
    /// 支付时间
    /// </summary>
    public DateTime? PayDate { get; set; }

    /// <summary>
    /// 订单状态  0：已下单，未支付   1：已支付
    /// </summary>
    public int OrderState { get; set; }

    /// <summary>
    /// 订单客户备注
    /// </summary>
    public string? Remarks { get; set; }

    /// <summary>
    /// 订单信息备注
    /// </summary>
    public string? OrderMsg { get; set; }

    /// <summary>
    /// 订单状态  0：作废  1：正常
    /// </summary>
    public bool Status { get; set; }
}
